/**
 * Created by DELL on 2018/9/17.
 */
var host_url = '//api.newscctv.net/activity/gq_play_2018/';
var base_url = 'https://www.newscctv.net/tap2cdn/tapvol/activities/2018/2018music/';  // 项目根目录

var _api = {
  // getAccessToken: '//api2.newscctv.net/newscctv/api_2_1_0/auth/getAccessToken', //获取微信AccessToken，
  getWxUserInfo: '//api2.newscctv.net/base/wx_userinfo_redis.php',          // 获取微信用户信息
  getPlayList: host_url + 'getPlayList.php',                                   // 获取演奏列表
  zanPlay: host_url + 'zanPlay.php',                                           // 点赞
  getHotList: host_url + 'getHotList.php',                                     // 获取热门列表
  getUserPlayNum: host_url + 'getUserPlayNum.php',                             // 获取用户的演奏次数
  getUserPlayInfo: host_url + 'getUserPlayInfo.php',                           // 获取演奏详情
  submitUserPlay: host_url + 'submitUserPlay.php',                             // 提交演奏结果

};
var _config = {
  appID: 'wxf21152668632e942',
  WXsharebaseIcon: base_url + 'images/wxShare.png',    // 微信分享页面
  WXsharebaseLink: base_url + 'share.html',    // 微信分享页面
  appBaseLink: base_url + 'index.html'    // 项目入口目录
};

var _isDevelopment = false;// 开发环境
var _hostname = window.location.hostname;
/*|| _hostname === 'www.newscctv.net'*/
if (_hostname === 'localhost' || _hostname === '192.168.21.193' || _hostname === 'cdn-live-ori.foundao.com') {
  _isDevelopment = true;
}
/*歌曲配置*/
/*
 * @bg_music 背景音乐
 * @music   曲谱
 * @batTime 一节时间
 *
 * */
var music_config = [
  {id: 1, bg_music: './media/bg1.mp3', music: song1, batTime: 858, music_name:　'我爱你中国'},
  {id: 2, bg_music: './media/bg2.mp3', music: song2, batTime: 660, music_name:　'歌唱祖国'},
  {id: 3, bg_music: './media/bg3.mp3', music: song3, batTime: 864, music_name:　'红旗飘飘'}
];

var piano_key = {
  '1': 'C',
  '2': 'D',
  '3': 'E',
  '4': 'F',
  '5': 'G',
  '6': 'A',
  '7': 'B'
};

var piano_tones = {
  '1': 3,
  '2': 4,
  '3': 5,
  '4': 6
};

// 低音
var audioSource1 = [
  {src: 'media/music2/31!.mp3'},
  {src: 'media/music2/32!.mp3'},
  {src: 'media/music2/33!.mp3'},
  {src: 'media/music2/34!.mp3'},
  {src: 'media/music2/35!.mp3'},
  {src: 'media/music2/36!.mp3'},
  {src: 'media/music2/37!.mp3'}
];
// 中音
var audioSource2 = [

  {src: 'media/music2/41!.mp3'},
  {src: 'media/music2/42!.mp3'},
  {src: 'media/music2/43!.mp3'},
  {src: 'media/music2/44!.mp3'},
  {src: 'media/music2/45!.mp3'},
  {src: 'media/music2/46!.mp3'},
  {src: 'media/music2/47!.mp3'}
];
// 高音
var audioSource3 = [

  {src: 'media/music2/51!.mp3'},
  {src: 'media/music2/52!.mp3'},
  {src: 'media/music2/53!.mp3'},
  {src: 'media/music2/54!.mp3'},
  {src: 'media/music2/55!.mp3'},
  {src: 'media/music2/56!.mp3'},
  {src: 'media/music2/57!.mp3'}
];

// 超高音
var audioSource4 = [

  {src: 'media/music2/61!.mp3'},
  {src: 'media/music2/62!.mp3'},
  {src: 'media/music2/63!.mp3'},
  {src: 'media/music2/64!.mp3'},
  {src: 'media/music2/65!.mp3'},
  {src: 'media/music2/66!.mp3'},
  {src: 'media/music2/67!.mp3'}
];
